﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PreCommitHook
{   
    /// <summary>
    /// Representes the result of the commit operation which is passsed to the entry point of the application
    /// IsValid is true if the commit should proceed and false if it must be rolled back
    /// ErrorMessage contains explanatory information about the reasons due to which the commit is rolled back
    /// </summary>
    public class PreCommitResult
    {
        public bool IsValid {get; private set;}
        public string ErrorMessage {get; private set;}

        public PreCommitResult(bool isValid, string errorMessage)
        {
            IsValid = isValid;
            ErrorMessage = errorMessage;
        }
    }
}
